<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        var now1=new Date();
        // console.log(now1);
        var now2 = new Date("2019-2-2 13:14:15");
        // console.log(now2);
        let user = {
        id: 1,
        name: "Tom",
        hello(who) {
            console.log(`${this.name} say hello to ${who} :)`);
        },
        addr: {
            prov: "jiangsu",
            city: "nanjing",
            street: {
                area: "baixia",
                zip: 210001
            }
        },
        favs: [ "Read", "Music" ]
    }

    let user2 = { };
    for (let attr in user) {
        user2[attr] = user[attr];
    }

    user.id=2;
    user.addr.street.zip=1000;
    console.log(user2);
    
    </script>
</head>
<body>
    
</body>
</html>